using System.Data;

namespace Dapper.Abstractions;

/// <summary>
/// 数据库连接工厂接口
/// </summary>
public interface IDbConnectionFactory
{
    /// <summary>
    /// 创建数据库连接
    /// </summary>
    IDbConnection CreateConnection();
    
    /// <summary>
    /// 异步创建数据库连接
    /// </summary>
    Task<IDbConnection> CreateConnectionAsync();
}